#coding:utf-8
'''
create on 2017-04-20
@author:sandy
'''
import logging
from pycommon import Const
from pycommon import Pack as packet
import CenterBuild

def cmdLoginLogin(login,pkt):
    sid = packet.unpack("H",pkt)
    login.onLogin(sid)
    login.sendPacket(CenterBuild.loginLoginCenterSucess())



#================================Ð­Òé±í===========================================
    
__cmdTable = {
              Const.CMD_LG2CT_LOGIN          : cmdLoginLogin
             } 

def parse(login, cmd, pkt):
    logging.debug(u"LoginParse cmd = %d",cmd)
    func = __cmdTable.get(cmd)
    if not func :
        logging.error(u"cmd is not exit");
    func(login, pkt)    
    
if __name__ == '__main__':
    pass